Conventionally, as a method of coding a stereo image by joining two still images taken from different viewpoints, a technology has been disclosed in Japanese Patent Application Laid-open Hei 11 No. 41627.
FIG. 15 is a block diagram showing a coding apparatus for stereo images in this prior art technology. A sub-sampling portion 1501 is a portion that sub-samples still image data; a joining portion 1502 is a portion that joins the thinned out still image data; and an encoder 1503 is a portion that encodes the joined still image data.
The operation of each portion will be described next.
Sub-sampling portion 1501 sub-samples input still image data to half in the horizontal direction. Here, the still image data is assumed to be input as, first, the image data (left image) for the left eye and then the image data (right image) for the right eye. In advance of the sub-sampling process, in sub-sampling portion 1501 each image is passed through a low-pass filter with respect to the horizontal direction so as to remove fold-over noise resulting from sub-sampling. Joining portion 1502 joins the left image and right image, both sub-sampled in the horizontal direction, into a joined image. In this case, the left image is put on the left side of the joined image and the right image is put on the right side of the joined image.
FIG. 16 is an illustrative view showing how the input images are sub-sampled by sub-sampling portion 1501 and joined in joining portion 1502. The figures in FIG. 16 represent the horizontal coordinate values of the pixels of the image before sub-sampling. Because both the left image and the right image are sub-sampled to half with respect to the horizontal direction, the number of pixels in the horizontal direction of the joined image is equal to the number of pixels in the horizontal direction of the input left or right image. Here, it is assumed that the number of horizontal pixels before sub-sampling is even-numbered.
Encoder 1503 encodes the joined image. For the coding of still images, international standard schemes such JPEG and the like may be used. The coded joined image of data (encoded data) is stored into an unillustrated recording medium. In this way, the left and right images for a stereo image are joined into a single joined image, which in turn is coded.
FIG. 17 is an example of a joined image created by a prior art. The pixel values across the boundary between the joined left and right images are generally discontinuous. Therefore, there is a problem in that the coding efficiency lowers when JPEG or other coding is carried out. For example, if the boundary between the left and right images exists in a DCT block of JPEG, the high-frequency components of DCT coefficients become large, hence the coding efficiency lowers.
Further, when the prior art is applied to a movie, an international standard scheme such as MPEG-4 or the like is used for encoding the joined image. If a boundary between the left and right images resides in a DCT block, the coding efficiency lowers.
Moreover, in the case of MPEG-4, even if no boundaries reside within a DCT block, there may occur a case where the coding efficiency lowers. Illustratively, in MPEG-4, the DCT coefficients of a block to be coded are predictively coded based on the surrounding blocks within the same frame to thereby improve the coding efficiency. Since the DCT coefficient of the left image is generally discontinuous from that of the right image around the boundary, prediction of DCT coefficients yields poor results, hence the coding efficiency lowers.
On the other hand, when a joined image for stereo display is output on a 2-dimensional display device, there is no definite method for generating a joined image into a 2D display image. Therefore, an identical output result cannot be obtained between image reproduction devices.
It is an object of the present invention to provide solution to these problems and to provide an image coding apparatus, image decoding apparatus, recording medium and image recording apparatus which enable efficient coding and decoding when stereo images are coded and decoded after joining.